package com.hlyj.http.base.tool.lib_hlyj_base.weather

import android.util.Log
import okhttp3.Interceptor
import okhttp3.Response

class MyLoggingInterceptor : Interceptor {
    override fun intercept(chain: Interceptor.Chain): Response {
        val originalRequest = chain.request()

        // 1. 打印完整 URL（包含 Query 参数）
        Log.e("qin", "Request URL: ${originalRequest.url}")

        // 2. 添加 Header
        val newRequest = originalRequest.newBuilder()
             .header("Content-Type", "application/json; charset=UTF-8")
            .build()

        return chain.proceed(newRequest)
    }
}